import VueRouter from 'vue-router'

// 导入路由对应的组件
import HomeContainer from './components/tabbar/HomeContainer.vue'
import MemberContainer from './components/tabbar/MemberContainer.vue'
import ShopcarContainer from './components/tabbar/ShopcarContainer.vue'
import SearchContainer from './components/tabbar/SearchContainer.vue'

var router = new VueRouter({
    routes: [
        {path: '/', redirect: '/home'},
        {path: '/home', component: HomeContainer},
        {path: '/member', component: MemberContainer},
        {path: '/shopcar', component: ShopcarContainer},
        {path: '/search', component: SearchContainer}
    ],
    // 当路由标签被选中后, vue-router默认会为标签添加一个router-link-active样式类
    // 为路由跳转标签统一自定义一个css样式类, 会覆盖掉router-link-active
    // mui-actives 是mui提供的一个tabbar选中高亮的一个样式类
    linkActiveClass: 'mui-active'
})

// 把路由对象暴露出去

export default router